import com.youlg.pojo.Books;
import com.youlg.service.Books.BookService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Mytest {
    @Test
    public void test(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        BookService bookServiecImpl = context.getBean("BookServiceImpl", BookService.class);
        List<Books> books = bookServiecImpl.queryAllBook();
        System.out.println(books);
    }
}
